package com.wf.course.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.page.PageBean;
import com.wf.course.dao.IGoodsCommentMapper;
import com.wf.course.model.goods.GoodsComment;
import com.wf.course.service.IGoodsCommentService;

@Service
@Transactional(rollbackFor=Exception.class)
public class IGoodsCommentServiceImpl implements IGoodsCommentService{
	
	@Autowired
	private IGoodsCommentMapper mapper;

	@Override
	public void indexInfo(PageBean<GoodsComment> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(this.mapper.queryList(pageBean));
		pageBean.setTotalCount(this.mapper.getTotalCount(pageBean).intValue());
	}

	@Override
	public void saveOrUpdateGoodsComment(GoodsComment goodsComment) {
		// TODO Auto-generated method stub
		this.mapper.saveGoodsComment(goodsComment);
	}

	@Override
	public GoodsComment queryGoodsCommentById(Integer id) {
		// TODO Auto-generated method stub
		return this.mapper.queryGoodsCommentById(id);
	}

	@Override
	public void deleteById(Integer id) {
		// TODO Auto-generated method stub
		this.mapper.deleteById(id);
	}
	@Override
	public boolean batchdeleteComment(String[] ids){
		return this.mapper.batchdeleteComment(ids);
	}
 
 
	
}
